﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Collections;

namespace eyeGuitarsWebService
{
    public class ConnectionClass
    {
        /// <summary>
        /// Static function in which the connection to the database is made
        /// </summary>
        /// <returns>SqlConnection con</returns>
        public static SqlConnection GetConnection()
        {
            SqlConnection con = new SqlConnection("Server=ae412949-f3ad-4980-bee2-a0f4011b6626.sqlserver.sequelizer.com;" + 
                "Database=dbae412949f3ad4980bee2a0f4011b6626;" + 
                "User ID=aewmpcwskqomcktv;" +
                "Password=jAMYdh84uDF8sdqRwEkkwxyZresoxdeGpUiB8Ns2k8hfF3zuwYgHoHCTcVF8WSEr");

            con.Open();
            return con;
        }

        public static void closeConnection(SqlConnection con)
        {
            con.Close();
        }
    }
}